// 评论相关类型定义
import { GetParam } from './common-api'

// 博客评论实体
export interface BlogComment {
  id: string
  blogTitle: string
  blogId: string
  nickname: string
  ip: string
  email: string
  content: string
  status: number
  reply: number
  createTime: string
  children: BlogComment[]
}

// 博客回复实体
export interface BlogReply {
  id: string
  commentId: string
  replyId: string
  replyNickname: string
  nickname: string
  ip: string
  email: string
  content: string
  status: number
}

// ==================== 评论API参数类型 ====================

// 评论分页查询参数
export interface CommentPageParam {
  status?: number
  reply?: number
  pageSize: number
  pageNum: number
}

// 评论状态变更参数
export interface CommentStatusChangeParam {
  id: string
  status: number
}

// 评论获取参数
export type CommentGetParam = GetParam

// ==================== 回复API参数类型 ====================

// 回复分页查询参数
export interface ReplyPageParam {
  commentId: string
  pageNum: number
  pageSize: number
}

// 回复状态变更参数
export interface ReplyStatusChangeParam {
  id: string
  status: number
}

// 评论树节点类型，兼容组件需求
export interface CommentNode {
  id: string
  blogTitle: string
  blogId: string
  nickname: string
  ip: string
  email: string
  content: string
  status: number
  reply: number
  createTime: string
  createTimeFormat: string
  replyToNickname?: string
  children?: CommentNode[]
  level?: number
}
